#
# $Id: Makefile.in,v 1.7 2003/08/03 14:07:02 nordstrom Exp $
#

SHELL           =   @SHELL@

top_builddir    =   ../..
subdir          =   tools/explode
srcdir          =   @srcdir@
VPATH           =   @srcdir@

DESTDIR	        =

BINDIR          =   $(DESTDIR)@bindir@
DATADIR         =   $(DESTDIR)@PLUCKERDIR@

UNPLUCK_DIR     =   $(top_builddir)/tools/unpluck

LIBS            =   @LIBS@
CPPFLAGS        =   @CPPFLAGS@ -I$(UNPLUCK_DIR)
CFLAGS          =   @CFLAGS@

INSTALL         =   @INSTALL@
INSTALL_PROGRAM =   @INSTALL_PROGRAM@
MKINSTALLDIRS   =   $(top_builddir)/mkinstalldirs

TARGET          =   explode

SOURCES         =   explode.c

OBJECTS         =   ${SOURCES:.c=.o} $(UNPLUCK_DIR)/libunpluck.a

all: $(TARGET)

explode.o : explode.c $(UNPLUCK_DIR)/unpluck.h
	$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/$*.c

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status

$(TARGET): $(OBJECTS)
	$(CC) -o $(TARGET) $(OBJECTS) $(LIBS)

depend: $(SOURCES)
	here=`pwd`; cd $(srcdir) && $(CC) -MM $(SOURCES) > $$here/.depend

.depend: $(SOURCES)
	here=`pwd`; cd $(srcdir) && $(CC) -MM $(SOURCES) > $$here/.depend

tags: $(SOURCES) *.h
	here=`pwd`; cd $(srcdir) && $(CTAGS) -o $$here/tags $(SOURCES) *.h


install:
	$(MKINSTALLDIRS) $(BINDIR)
	$(INSTALL_PROGRAM) $(TARGET) $(BINDIR)

clean:
	rm -f *.o core .depend $(TARGET)

distclean: clean
	rm -f Makefile netscape4-plucker-helper

maintainer-clean: distclean
	@echo "------------------------------------------------------------"
	@echo "This command is intended for maintainers to use..."
	@echo "it deletes files that may require special tools to rebuild."
	@echo "------------------------------------------------------------"

